Page({
  data: {
    modules: [
      { id: 1, name: '景区门票', icon: '/images/ticket.png' },
      { id: 2, name: '红黑榜', icon: '/images/rank.png' },
      { id: 3, name: '精选民宿', icon: '/images/hotel.png' },
      { id: 4, name: '特色美食', icon: '/images/food.png' },
      { id: 5, name: 'ai伴游', icon: '/images/ai.png' },
      { id: 6, name: '路线推荐', icon: '/images/route.png' },
      { id: 7, name: '文创特产', icon: '/images/souvenir.png' },
      { id: 8, name: '停车服务', icon: '/images/parking.png' },
    ],
    features: [
      { id: 1, name: '遇龙河', image: '/images/banner1.png' },
      { id: 2, name: '竹筏漂游', image: '/images/banner2.png' },
      { id: 3, name: '漓江风光', image: '/images/banner1.png' },
	   { id: 3, name: '漓江风光', image: '/images/banner1.png' },
    ],
    hotActivities: [
      { id: 1, image: '/images/banner1.png' },
      { id: 2, image: '/images/banner2.png' },
	  { id: 3, image: '/images/banner1.png' },
	  { id: 4, image: '/images/banner2.png' },
    ],

   
  },
  
  
   // 导航至对应页面的方法
    navigateToPage(e) {
      const moduleId = e.currentTarget.dataset.id;
      
      let url = '';
      switch(moduleId) {
        case 1:
          url = '/pages/ticket/ticket'; // 替换为实际路径
          break;
        case 2:
          url = '/pages/foodRank/foodRank'; // 替换为实际路径
          break;
        case 3:
          url = '/pages/hostelList/hostelList'; // 替换为实际路径
          break;
        case 4:
          url = '/pages/food/food'; // 替换为实际路径
          break;
        case 5:
          url = '/pages/ai/ai'; // 替换为实际路径
          break;
        case 6:
          url = '/pages/navigation/navigation'; // 替换为实际路径
          break;
        case 7:
          url = '/pages/culturalProducts/culturalProducts'; // 替换为实际路径
          break;
        case 8:
          url = '/pages/parkingService/parkingService'; // 替换为实际路径
          break;
        default:
          console.log('未定义的模块ID:', moduleId);
      }
      
      if (url) {
        wx.navigateTo({
          url: url,
        });
      }
    }
  
  
});